﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Alos.Entity
{
    public class JsonRtn<T>
    {
        RtnState _state = RtnState.sucess;
        /// <summary>
        /// 状态编号
        /// </summary>
        public RtnState state
        {
            get
            {
                return _state;
            }
            set
            {
                _state = value;
            }
        }
        /// <summary>
        /// 消息
        /// </summary>
        public string message { get; set; }
        /// <summary>
        /// 返回数据
        /// </summary>
        public T data { get; set; }
    }
    public enum RtnState
    {
        /// <summary>
        /// 执行成功
        /// </summary>
        sucess = 200,
        /// <summary>
        /// 需要登陆
        /// </summary>
        login = 250,
        /// <summary>
        /// 执行失败
        /// </summary>
        fail = 300,
        /// <summary>
        /// 出现异常
        /// </summary>
        error = 400
    }
}
